﻿using System;
using Unknown.Framework.Database;
using Unknown.Source.Entity.Example;

namespace Unknown.Source.Sql.Example
{
	/// <summary>
	/// 艺术品SQL接口
	/// </summary>
	public interface IArtworkSql
	{
		/// <summary>
		/// 构建新增
		/// </summary>
		/// <param name="entity">实体</param>
		/// <returns>操作</returns>
		Operation BuildInsert(Artwork entity);

		/// <summary>
		/// 构建修改
		/// </summary>
		/// <param name="entity">实体</param>
		/// <returns>操作</returns>
		Operation BuildUpdate(Artwork entity);

		/// <summary>
		/// 构建删除
		/// </summary>
		/// <param name="pkid">标识</param>
		/// <returns>操作</returns>
		Operation BuildDelete(string pkid);

		/// <summary>
		/// 构建查询
		/// </summary>
		/// <param name="first">开始行</param>
		/// <param name="last">结束行</param>
		/// <returns>操作</returns>
		Operation BuildSelect(int first, int last);

		/// <summary>
		/// 构建查询
		/// </summary>
		/// <param name="pkid">标识</param>
		/// <returns>操作</returns>
		Operation BuildSelect(string pkid);

		/// <summary>
		/// 构建查询
		/// </summary>
		/// <param name="entity">实体</param>
		/// <returns>操作</returns>
		Operation BuildSelectUnique(Artwork entity);
	}
}
